﻿<div id="navigation-content">
<div id="navigation">

      @if(ViewBag.Collections !=null)
                                {
                                    <ul class="top-level">
                                    @foreach (MiniBottles.Models.DictCollection collection in ViewBag.Collections)
                                    {
                                        <li>
                                            <a href="@Url.Action("Index", "Collection", new { collectionId = collection.Id })">@collection.Name</a>
                                            @if (collection.Categories != null)
                                            {
                                             <ul class="sub-level">
                                                 @foreach (MiniBottles.Models.DictCategory category in collection.Categories.Where(x=> !x.IsDeleted && x.IsActive).OrderBy(x=>x.Name))
                                                {
                                                <li> <a href="@Url.Action("Index", "Collection", new { categoryId = category.Id })">@category.Name (@category.Bottles.Count)</a></li>
                                                 }
                                             </ul>
                                            }

                                        </li>
                                    }
                                    </ul>
                                }
</div> 
</div>
                              